package com.ruoyi.charge.controller;

import com.ruoyi.charge.domain.ChargingProgress;
import com.ruoyi.charge.es.ChargingProgressRepository;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ChargingFindProgressController {
    @Autowired
    ChargingProgressRepository chargingProgressRepository;

    @GetMapping("/charging/progress/{value}")
    public AjaxResult findProgress(@PathVariable Long value) {
        List<ChargingProgress> list =
                chargingProgressRepository.findByTemperatureGreaterThan(value);
        return AjaxResult.success(list);
    }
}
